import sys

#if len(sys.argv)<2:
#     print("usage:")
#     exit(0)
#inf= sys.argv[1]
inf='dex-vaule-fmt.txt'

myfile = open(inf, "r")

l=[]
ll=[]

for line in (myfile):
	s=line.strip(' \t\n')
	if len(s)<1:
		continue
		
	if s.startswith('#'):
		continue
		
	s1=s.split('\t')
	ll.append(s1)

print('''
#ifndef __encoded_value_h__
#define __encoded_value_h__
#include "dex-types.h"

class CDexEncodedValue
{
public:
	ubyte value_type:5;
	ubyte value_arg:3;

	int Size();
	void print();
	int sprint(char * buffer);
};


	''')	
for x in ll:

	print('#define %s %s'%(x[0],x[1]))
	
	
print('''

#endif//__encoded_value_h__
	''')	